<%= form_for(@invoice_detail, url:
		if action_name == "new"
			invoice_invoice_details_path
		else
			invoice_invoice_detail_path
		end
	) do |f| %>
  <% if @invoice_detail.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@invoice_detail.errors.count, "error") %> prohibited this invoice_detail from being saved:</h2>

      <ul>
      <% @invoice_detail.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :invoice_item_type_id %><br>
    <%= f.collection_select(:invoice_item_type_id, InvoiceItemType.all, :id, :label, prompt: true) %>
    <%= link_to 'New Invoice item type', new_invoice_invoice_item_type_path %>
  </div>
  <div class="field">
    <%= f.label :fee %><br>
    <%= f.text_field :fee %>
  </div>
  <div class="field">
    <%= f.label :discount %><br>
    <%= f.text_field :discount %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
